home *** CD-ROM | disk | FTP | other *** search
- #include <windows.h>
-
- LONG WINAPI _export cw_CommDlgID(HWND w)
- {
- LONG rv=0;
- char buf[33];
- /* Look for key control in common dialog */
- if (GetDlgItemText(w,0x441,buf,sizeof(buf))&&
- !strncmpi(buf,"Save",4)) return COMMON_SAVE;
- if (GetDlgItemText(w,0x441,buf,sizeof(buf))&&
- !strncmpi(buf,"List",4)) return COMMON_OPEN;
- if (GetDlgItemText(w,0x421,buf,sizeof(buf))&&
- !strncmpi(buf,"&Down",5)) return COMMON_FIND;
- if (GetDlgItemText(w,0x400,buf,sizeof(buf))&&
- !strncmpi(buf,"&Replace",8)) return COMMON_REPL;
- if (GetDlgItemText(w,0x445,buf,sizeof(buf))&&
- !strncmpi(buf,"Printer:",8)) return COMMON_PRINT;
- if (GetDlgItemText(w,0x440,buf,sizeof(buf))&&
- !strncmpi(buf,"&Font",5)) return COMMON_FONT;
- if (GetDlgItemText(w,0x432,buf,sizeof(buf))&&
- !strncmpi(buf,"Printer",7)) return COMMON_PSETUP;
- if (GetDlgItemText(w,0x2CF,buf,sizeof(buf))&&
- !strncmpi(buf,"&Define",7)) return COMMON_COLOR;
- return rv;
- }
-